﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes {
    import Engine.Classes.*;
    import flash.events.*;
    import Engine.Managers.*;
    import flash.display.*;
    import flash.geom.*;
    import Engine.Helpers.*;
    import Events.*;
    import flash.utils.*;
    import org.aswing.*;
    import Transactions.*;
    import Classes.util.*;
    import flash.filters.*;
    import Display.*;
    import GameMode.*;
    import Classes.doobers.*;
    import Classes.inventory.*;
    import Engine.*;

	/**
	 * 对比WorldObject, GameObject多了不少跟界面UI相关的操作
	 */
    public class GameObject extends WorldObject implements IToolTipTarget {

        public static const USE_CUSTOM_CURSORS:Boolean = false;
        public static const TOOLTIP_TOP:String = "top";
        public static const MESSAGE_TYPE_GAIN_XP:String = "Status_HarvestXP";
        public static const MESSAGE_TYPE_GAIN_COINS:String = "Status_HarvestCoins";
        public static const MESSAGE_TYPE_SPEND_ENERGY:String = "SpendEnergy";
        public static const MESSAGE_COMMODITY:String = "Commodity";
        public static const MESSAGE_COINS:String = "Coins";
        public static const MESSAGE_ENERGY:String = "Energy";
        public static const MESSAGE_XP:String = "XP";
        public static const MESSAGE_REP:String = "Rep";
        public static const MESSAGE_POP:String = "Pop";
        public static const MESSAGE_GAIN:String = "Gain";
        public static const MESSAGE_SPEND:String = "Spend";

        protected static var ACTIONBAR_WIDTH:int = 85;
        protected static var ACTIONBAR_HEIGHT:int = 25;
        protected static var ARROW_SCALE:Number = 0.25;
        protected static var STATUS_DELAY:int = 1000;

        protected const MOVE_OBJECT:String = "moveObject";
        protected const SELL_OBJECT:String = "sellObject";
        protected const ROTATE_OBJECT:String = "rotateObject";
        public const PLAY_ACTION:String = "playAction";
        public const VISIT_PLAY_ACTION:String = "visitPlayAction";
        public const VISIT_REPLAY_ACTION:String = "visitReplayAction";
        public const NO_ACTION:String = "noAction";
        public const DEFAULT_REPLAY_TIME:Number = 2;

        protected var m_customCursor:JPanel;
        protected var m_customCursorLabel:JLabel;
        protected var m_customCursorHolder:Sprite;
        protected var m_customCursorWindow:JWindow;
        protected var m_actionMode:String = "noAction";
        protected var m_visitReplayLock:int = 0;
        protected var m_menuItems:Array;
        protected var m_clearLock:int = 0;
        protected var m_filters:Array;
        protected var m_actionBar:ActionBar;
        protected var m_occluding:Boolean;
        protected var m_arrow:DisplayObject;
        private var m_objectIndicator:DisplayObject;
        protected var m_actionBarOffsetX:int;
        protected var m_actionBarOffsetY:int;
        protected var m_overrideActionBarY:int;
        protected var m_sellCallback:Function = null;
        protected var m_statusQueue:Array;
        protected var m_resourceChangesQueue:Array;
        protected var m_lastStatusRemovalTime:int;
        protected var m_showHighlight:Boolean;
        protected var m_toolTipBlocked:Boolean = false;
        protected var m_numVisitorInteractions:int = 0;
        protected var m_maxNumVisitorInteractions:int = 1;

        public function GameObject(){
            this.m_menuItems = [];
            this.m_filters = [];
            this.m_statusQueue = [];
            this.m_resourceChangesQueue = [];
            super();
            this.m_overrideActionBarY = 0;
        }
        public function get areVisitorInteractionsExhausted():Boolean{
            return ((this.m_numVisitorInteractions >= this.m_maxNumVisitorInteractions));
        }
        public function get numVisitorInteractions():int{
            return (this.m_numVisitorInteractions);
        }
        public function set numVisitorInteractions(_arg1:int):void{
            this.m_numVisitorInteractions = _arg1;
        }
        override public function detach():void{
            this.m_statusQueue = [];
            this.updateObjectIndicator();
            this.setActionProgress(false);
            super.detach();
        }
        override public function drawDisplayObject():void{
            super.drawDisplayObject();
            var _local1:Sprite = (m_displayObject as Sprite);
            if (_local1 == null){
                createDisplayObject();
            };
        }
        public function getToolTipStatus():String{
            return (null);
        }
        public function getToolTipHeader():String{
            return (null);
        }
        public function getToolTipNotes():String{
            return (null);
        }
        public function getToolTipAction():String{
            return (null);
        }
        public function toolTipFollowsMouse():Boolean{
            return (false);
        }
        public function getToolTipVisibility():Boolean{
            return (!(this.m_toolTipBlocked));
        }
        public function getToolTipPosition():Vector3{
            return (super.getPosition());
        }
        public function getToolTipScreenOffset():Vector2{
            return (null);
        }
        public function getDimensions():Vector3{
            return (null);
        }
        public function getToolTipFloatOffset():int{
            return (0);
        }
        public function get actionMode():String{
            return (this.m_actionMode);
        }
        protected function updateActionBarPosition():void{
            var _local1:Point;
            if (((this.m_actionBar) && (this.m_actionBar.visible))){
                _local1 = IsoMath.tilePosToPixelPos(m_position.x, m_position.y);
                _local1.y = (_local1.y - ((((this.m_overrideActionBarY == 0)) && (m_displayObject))) ? m_displayObject.height : this.m_overrideActionBarY);
                _local1 = IsoMath.viewportToStage(_local1);
                this.m_actionBar.x = ((_local1.x - (ACTIONBAR_WIDTH / 2)) + this.m_actionBarOffsetX);
                this.m_actionBar.y = ((_local1.y - ACTIONBAR_HEIGHT) + this.m_actionBarOffsetY);
            };
        }
        public function setActionBarOverrideY(_arg1:int):void{
            this.m_overrideActionBarY = _arg1;
        }
        protected function drawActionBar():void{
            if (this.m_actionBar){
                this.m_actionBar.redraw();
                if (!this.m_actionBar.visible){
                    this.m_actionBar.visible = true;
                };
                this.updateActionBarPosition();
            };
        }
        public function setActionProgress(_arg1:Boolean, _arg2:String="", _arg3:Number=0, _arg4:Boolean=true):void{
            var _local5 = !((this.m_actionBar == null));
            if (((_arg1) && (!(_local5)))){
                this.m_actionBar = new ActionBar(ACTIONBAR_WIDTH, ACTIONBAR_HEIGHT, _arg2, _arg4);
                this.m_actionBar.visible = false;
                GlobalEngine.viewport.hudBase.addChild(this.m_actionBar);
            };
            if (((_arg1) && (((!((this.m_actionBar.progress == _arg3))) || (!((this.m_actionBar.prefix == _arg2))))))){
                this.m_actionBar.progress = _arg3;
                this.m_actionBar.prefix = _arg2;
                this.m_actionBar.showPercent = _arg4;
                this.drawActionBar();
            };
            if (((!(_arg1)) && (_local5))){
                this.m_actionBar.parent.removeChild(this.m_actionBar);
                this.m_actionBar = null;
            };
            this.updateAlpha();
        }
        public function setActionBarOffset(_arg1:int, _arg2:int):void{
            this.m_actionBarOffsetX = _arg1;
            this.m_actionBarOffsetY = _arg2;
        }
        public function onVisitReplayAction(_arg1:TRedeemVisitorHelpAction):Number{
            this.m_visitReplayLock--;
            this.m_actionMode = this.VISIT_REPLAY_ACTION;
            return (this.DEFAULT_REPLAY_TIME);
        }
        public function onVisitPlayAction():void{
            this.m_actionMode = this.VISIT_PLAY_ACTION;
        }
        override public function hasValidId():Boolean{
            var _local1:Boolean;
            if (m_id == 0){
                _local1 = false;
            };
            return (_local1);
        }
        public function showObjectBusy():void{
            this.displayStatus(ZLoc.t("Main", "ObjectBusy"));
            StatsManager.count("errors", "has_valid_id_is_zero");
        }
        override public function onUpdate(_arg1:Number):void{
            super.onUpdate(_arg1);
            this.pumpDisplayStatusQueue();
        }
        public function doResourceChanges(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:String="", _arg6:Boolean=true, _arg7:Boolean=true, _arg8:Boolean=true, _arg9:Number=0, _arg10:Number=0, _arg11:Array=null):void{
            var _local12 = "";
            var _local13 = "";
            var _local14 = "";
            var _local15:* = null;
            var _local16:Object;
            if (_arg5 == ""){
                _arg5 = ZLoc.t("Main", "DefaultCommodityName");
            } else {
                if (_arg5 == "goods"){
                    _arg5 = ZLoc.t("Main", "DefaultCommodityName");
                } else {
                    if (_arg5 == "premium_goods"){
                        _arg5 = ZLoc.t("Main", "Commodity_premium_goods_friendlyName");
                    };
                };
            };
            if (_arg1 != 0){
                _local14 = MESSAGE_ENERGY;
                _local13 = ((_arg1)<0) ? MESSAGE_SPEND : MESSAGE_GAIN;
                _local16 = ((_arg1)<0) ? 0xFF6A00 : 0xAA00;
                _local12 = (_local12 + ZLoc.t("Main", (_local13 + _local14), {energy:_arg1}));
                if (_arg8){
                    _local15 = new EmbeddedArt.smallEnergyIcon();
                };
                if (_arg7){
                    Global.player.updateEnergy(_arg1, _arg11);
                };
            };
            if (_arg4 != 0){
                _local14 = MESSAGE_COMMODITY;
                _local13 = ((_arg4)<0) ? MESSAGE_SPEND : MESSAGE_GAIN;
                _local16 = ((_arg4)<0) ? 0xFF6A00 : 0xFFFFFF;
                _local12 = (_local12 + ZLoc.t("Main", (_local13 + _local14), {
                    amount:_arg4,
                    commodity:_arg5
                }));
                if ((((_local15 == null)) && (_arg8))){
                    _local15 = new EmbeddedArt.smallGoodsIcon();
                };
            };
            if (_arg6){
                this.displayStatus(_local12, _local15);
            } else {
                this.enqueueResourceChange(_local12, _local15);
            };
            _local12 = "";
            _local15 = null;
            if (_arg2 != 0){
                _local14 = MESSAGE_COINS;
                _local13 = ((_arg2)<0) ? MESSAGE_SPEND : MESSAGE_GAIN;
                _local16 = ((_arg2)<0) ? 0xFFFFFF : 0xAA00;
                _local12 = (_local12 + ZLoc.t("Main", (_local13 + _local14), {coins:_arg2}));
                if (_arg8){
                    _local15 = new EmbeddedArt.smallCoinIcon();
                };
                if (_arg7){
                    Global.player.gold = (Global.player.gold + _arg2);
                };
            };
            if (_arg3 != 0){
                _local14 = MESSAGE_XP;
                _local13 = MESSAGE_GAIN;
                _local16 = 0xFFFFFF;
                _local12 = (_local12 + ZLoc.t("Main", (_local13 + _local14), {experience:_arg3}));
                if ((((_local15 == null)) && (_arg8))){
                    _local15 = new EmbeddedArt.smallXPIcon();
                };
                if (_arg7){
                    Global.player.xp = (Global.player.xp + _arg3);
                };
            };
            if (_arg9 != 0){
                _local14 = MESSAGE_REP;
                _local13 = MESSAGE_GAIN;
                _local16 = 0xFFFFFF;
                _local12 = (_local12 + ZLoc.t("Main", (_local13 + _local14), {reputation:_arg9}));
                if (_arg7){
                    Global.player.socialXp = (Global.player.socialXp + _arg9);
                };
            };
            if (_arg10 != 0){
                _local14 = MESSAGE_POP;
                _local13 = MESSAGE_GAIN;
                _local16 = 0xFFFFFF;
                _local12 = (_local12 + ZLoc.t("Main", (_local13 + _local14), {population:_arg10}));
            };
            if (_arg6){
                this.displayStatus(_local12, _local15, _local16);
            } else {
                this.enqueueResourceChange(_local12, _local15, _local16);
            };
        }
        public function doEnergyChanges(_arg1:Number, _arg2:Array, _arg3:Boolean=true, _arg4:Boolean=true, _arg5:Boolean=true):void{
            this.doResourceChanges(_arg1, 0, 0, 0, "", _arg3, _arg4, _arg5, 0, 0, _arg2);
        }
        protected function enqueueResourceChange(_arg1:String, _arg2, _arg3:Object=0xFFFFFF):void{
            this.m_resourceChangesQueue.push({
                message:_arg1,
                icon:_arg2,
                color:_arg3
            });
        }
        protected function displayDelayedResourceChanges():void{
            var _local1:Object;
            for each (_local1 in this.m_resourceChangesQueue) {
                this.displayStatus(_local1.message, _local1.icon, _local1.color);
            };
            this.m_resourceChangesQueue.splice(0, this.m_resourceChangesQueue.length);
        }
        public function displayStatusGeneric(_arg1:String, _arg2):void{
            var _local3:String = ZLoc.t("Main", _arg1, {value:_arg2});
            var _local4:* = "";
            switch (_arg1){
                case MESSAGE_TYPE_GAIN_COINS:
                    _local4 = new EmbeddedArt.smallCoinIcon();
                    break;
            };
            this.displayStatus(_local3, _local4);
        }
        public function displayStatus(_arg1:String, _arg2:Object="", _arg3:Object=0xFFFFFF):void{
            var _local5:MessageDef;
            var _local4:Point = this.displayStatusStartPos();
            if (_arg2 == ""){
                for each (_local5 in this.m_statusQueue) {
                    if (_local5.message == _arg1){
                        return;
                    };
                };
            };
            this.m_statusQueue.unshift(new MessageDef(_arg1, _local4, _arg2, _arg3));
            Global.ui.hideToolTip(this);
            this.m_toolTipBlocked = true;
        }
        public function displayStatusComponent(_arg1:DisplayObject):void{
            var _local3:MessageDef;
            var _local2:Point = this.displayStatusStartPos();
            for each (_local3 in this.m_statusQueue) {
                if (_local3.displayObj == _arg1){
                    return;
                };
            };
            this.m_statusQueue.unshift(new MessageDef(null, _local2, null, null, _arg1));
            Global.ui.hideToolTip(this);
            this.m_toolTipBlocked = true;
        }
        protected function pumpDisplayStatusQueue():void{
            var _local1:MessageDef;
            if ((((this.m_statusQueue.length > 0)) && (((getTimer() - this.m_lastStatusRemovalTime) > STATUS_DELAY)))){
                this.m_lastStatusRemovalTime = getTimer();
                _local1 = this.m_statusQueue.pop();
                if (_local1.displayObj == null){
                    UI.displayStatus(_local1.message, _local1.location.x, _local1.location.y, _local1.iconDef, null, 1.5, 32, 16, 60, _local1.msgColor);
                } else {
                    UI.displayStatusComponent(_local1.displayObj, _local1.location.x, _local1.location.y, 2, 32);
                };
            };
            if (((((this.m_toolTipBlocked) && ((this.m_statusQueue.length <= 0)))) && (((getTimer() - this.m_lastStatusRemovalTime) > (UI.DEFAULT_STATUS_TWEEN_DURATION * 1000))))){
                this.m_toolTipBlocked = false;
                if ((Global.world.getTopGameMode() is GMDefault)){
                    this.m_toolTipBlocked = false;
                    (Global.world.getTopGameMode() as GMDefault).updateObjectUnderMouse();
                };
            };
        }
        protected function displayStatusStartPos():Point{
            var _local1:Point = IsoMath.tilePosToPixelPos(m_position.x, m_position.y);
            if (m_displayObject){
                _local1.y = (_local1.y - (m_displayObject.height * 1.1));
            };
            return (IsoMath.viewportToStage(_local1));
        }
        public function getMenuPosition(_arg1:Array):Point{
            return (null);
        }
        public function onMenuClick(_arg1:MouseEvent):void{
        }
        public function onObjectDrag(_arg1:Vector3):void{
        }
        public function onObjectDrop(_arg1:Vector3):void{
            this.showOccluder();
        }
        public function onSelect():void{
        }
        public function onDeselect():void{
        }
        public function move():void{
            Global.world.addGameMode(new GMObjectMove(this), false);
        }
        public function onAddCrewMember():void{
        }
        public function onPlayAction():void{
            if (this.m_visitReplayLock > 0){
                return;
            };
            this.m_actionMode = this.PLAY_ACTION;
        }
        public function finalizeAndAwardVisitorHelp(_arg1:String, _arg2:int=0, _arg3:int=0, _arg4:int=0):void{
            var _local5:Array;
            GameTransactionManager.addTransaction(new TPerformVisitorHelp(Global.world.ownerId, this, _arg1));
            if (Global.world.dooberManager.isDoobersEnabled()){
                _local5 = [];
                if (_arg2 > 0){
                    _local5.push([Global.gameSettings.getDooberFromType(Doober.DOOBER_REP, _arg2), _arg2]);
                };
                if (_arg3 > 0){
                    _local5.push([Global.gameSettings.getDooberFromType(Doober.DOOBER_COIN, _arg3), _arg3]);
                };
                if (_arg4 > 0){
                    _local5.push([Global.gameSettings.getDooberFromType(Doober.DOOBER_GOODS, _arg4), _arg4]);
                };
                Global.world.dooberManager.createBatchDoobers(_local5, null, m_position.x, m_position.y);
            } else {
                Global.player.socialXp = (Global.player.socialXp + _arg2);
                Global.player.gold = (Global.player.gold + _arg3);
                Global.player.commodities.add(Commodities.GOODS_COMMODITY, _arg4);
            };
        }
        public function lockForReplay():void{
            this.m_visitReplayLock++;
        }
        public function unlockForReplay():void{
            this.m_visitReplayLock--;
        }
        public function get replayLock():int{
            return (this.m_visitReplayLock);
        }
        public function sell():void{
            if (this.isSellable()){
                UI.displayMessage(ZLoc.t("Main", "SellObject"), GenericPopup.TYPE_YESNO, this.sellConfirmationHandler, "sellDialog");
            };
        }
        protected function getSellPrice():int{
            return (0);
        }
        public function isSellable():Boolean{
            return (false);
        }
        protected function isObjectIndicatorVisible():Boolean{
            return (false);
        }
        public function updateObjectIndicator():void{
            var _local1:Boolean = this.isObjectIndicatorVisible();
            var _local2 = !((this.m_objectIndicator == null));
            if (((_local1) && (!(_local2)))){
                this.m_objectIndicator = this.generateObjectIndicator();
                this.updateObjectIndicatorPosition();
                GlobalEngine.viewport.hudBase.addChild(this.m_objectIndicator);
            };
            if (((!(_local1)) && (_local2))){
                GlobalEngine.viewport.hudBase.removeChild(this.m_objectIndicator);
                this.m_objectIndicator = null;
            };
            if (((_local1) && (_local2))){
                this.updateObjectIndicatorPosition();
            };
        }
        protected function generateObjectIndicator():DisplayObject{
            return (new EmbeddedArt.visitEnergyIcon());
        }
        private function updateObjectIndicatorPosition(_arg1:String=null):void{
            var _local2:Point;
            if (this.m_objectIndicator){
                _local2 = IsoMath.tilePosToPixelPos(m_position.x, m_position.y);
                if (m_displayObject){
                    _local2.y = (_local2.y - (m_displayObject.height / 2));
                };
                _local2 = IsoMath.viewportToStage(_local2);
                if ((((_arg1 == null)) || ((_arg1 == "")))){
                    _local2.y = (_local2.y - (this.m_objectIndicator.height / 2));
                } else {
                    _local2.y = (_local2.y - this.m_objectIndicator.height);
                };
                if (((!((_local2.x == this.m_objectIndicator.x))) || (!((_local2.y == this.m_objectIndicator.y))))){
                    this.m_objectIndicator.x = _local2.x;
                    this.m_objectIndicator.y = (_local2.y - this.m_objectIndicator.height);
                };
            };
        }
        protected function setArrowPosition():void{
            var _local1:Point;
            var _local2:Sprite;
            if (((this.m_arrow) && (m_displayObject))){
                _local1 = new Point();
                _local2 = (m_displayObject as Sprite);
                this.m_arrow.scaleX = (ARROW_SCALE / m_displayObject.scaleX);
                this.m_arrow.scaleY = (ARROW_SCALE / m_displayObject.scaleY);
                if (_local2.getChildAt(0)){
                    _local1.y = -(this.m_arrow.height);
                    _local1.x = ((_local2.getChildAt(0).width - this.m_arrow.width) / 2);
                    if (((!((_local1.x == this.m_arrow.x))) || (!((_local1.y == this.m_arrow.y))))){
                        this.m_arrow.y = _local1.y;
                        this.m_arrow.x = _local1.x;
                    };
                };
            };
        }
        override public function setHighlighted(_arg1:Boolean, _arg2:uint=16755200):void{
            if (m_displayObject){
                m_highlighted = _arg1;
                if (((_arg1) && (this.canShowHighlight))){
                    m_displayObject.filters = [new GlowFilter(this.getHighlightColor(), 1, 8, 8, 20)];
                } else {
                    m_displayObject.filters = this.m_filters.concat([]);
                };
                renderBufferDirty = true;
            };
        }
        public function setShowHighlight(_arg1:Boolean):void{
            this.m_showHighlight = _arg1;
        }
        public function get canShowHighlight():Boolean{
            return (this.m_showHighlight);
        }
        public function getHighlightColor():uint{
            return (EmbeddedArt.HIGHLIGHT_COLOR);
        }
        public function isLocked():Boolean{
            return ((this.m_clearLock > 0));
        }
        public function lock():void{
            this.m_clearLock++;
            this.updateAlpha();
        }
        public function unlock():void{
            this.m_clearLock--;
            this.updateAlpha();
        }
        public function isOccluder():Boolean{
            return (this.m_occluding);
        }
        public function hideOccluder():void{
            this.m_occluding = true;
            this.updateAlpha();
        }
        public function showOccluder():void{
            this.m_occluding = false;
            this.updateAlpha();
        }
        public function updateAlpha():void{
            if (this.m_clearLock > 0){
                this.alpha = 0.6;
            } else {
                if (this.m_occluding){
                    this.alpha = 0.33;
                } else {
                    this.alpha = 1;
                };
            };
        }
        public function onSell():void{
            if (this.m_sellCallback != null){
                this.m_sellCallback(this);
            };
        }
        public function canBeDragged():Boolean{
            return (true);
        }
        public function canBeRotated():Boolean{
            return (true);
        }
        public function getSnapX():int{
            return (1);
        }
        public function getSnapY():int{
            return (1);
        }
        protected function sellNow():void{
            var _local1:int;
            if (this.isSellable()){
                GameTransactionManager.addTransaction(new TSell(this));
                this.detach();
                cleanup();
                this.onSell();
                _local1 = this.getSellPrice();
                if (_local1 > 0){
                    Global.player.gold = (Global.player.gold + _local1);
                };
            };
        }
        protected function sellConfirmationHandler(_arg1:GenericPopupEvent):void{
            var _local3:int;
            var _local2 = (_arg1.button == GenericPopup.YES);
            if (_local2 == true){
                if (this.isSellable()){
                    GameTransactionManager.addTransaction(new TSell(this));
                    this.detach();
                    cleanup();
                    this.onSell();
                    _local3 = this.getSellPrice();
                    Global.player.gold = (Global.player.gold + _local3);
                    this.displayStatus(ZLoc.t("Main", "Status_ObjectSold", {coins:_local3}));
                };
            };
        }
        public function registerSellCallback(_arg1:Function):void{
            this.m_sellCallback = _arg1;
        }
        public function preDisableMove(_arg1:String, _arg2:int):void{
        }
        public function postDisableMove(_arg1:Vector3):void{
        }
        public function addTMoveParams(_arg1:Object):Object{
            return (_arg1);
        }
        override public function centerOn():void{
            Global.world.centerOnObject(this);
        }
        public function isVisitorInteractable():Boolean{
            return (false);
        }
        public function get unlimitedVisits():Boolean{
            return (false);
        }
        public function overrideCursor():Boolean{
            return ((Global.world.isEditMode) ? false : true);
        }
        public function getCustomCursor():Object{
            return (null);
        }
        public function get actionBar():ActionBar{
            return (this.m_actionBar);
        }

    }
}//package Classes 

import flash.display.*;
import flash.geom.*;

class MessageDef {

    public var displayObj:DisplayObject;
    public var message:String;
    public var location:Point;
    public var iconDef:Object;
    public var msgColor:Object;

    public function MessageDef(_arg1:String, _arg2:Point, _arg3:Object, _arg4:Object, _arg5:DisplayObject=null){
        this.message = _arg1;
        this.displayObj = _arg5;
        this.location = _arg2;
        this.iconDef = _arg3;
        this.msgColor = _arg4;
    }
}
